package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketKeyword;
import com.cskaoyan.bean.MarketKeywordExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketKeywordMapper {
    long countByExample(MarketKeywordExample example);

    int deleteByExample(MarketKeywordExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketKeyword record);

    int insertSelective(MarketKeyword record);

    List<MarketKeyword> selectByExample(MarketKeywordExample example);

    MarketKeyword selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketKeyword record, @Param("example") MarketKeywordExample example);

    int updateByExample(@Param("record") MarketKeyword record, @Param("example") MarketKeywordExample example);

    int updateByPrimaryKeySelective(MarketKeyword record);

    int updateByPrimaryKey(MarketKeyword record);

    /**
     * 分页选择关键字通过基本参数和关键字和url
     *
     * @param keyword 关键字
     * @param url     url
     * @param sort    排序
     * @param order   订单
     * @return {@link List }<{@link MarketKeyword }>
     * @author: jinmo
     * @date: 2022/06/26 19:30:11
     */
    List<MarketKeyword> select(@Param("keyword") String keyword, @Param("url") String url, @Param("sort") String sort, @Param("order") String order);

    /**
     * 插入关键词，返回带id
     *
     * @param marketKeyword 市场关键字
     * @author: jinmo
     * @date: 2022/06/26 19:57:25
     */
    void insertWithId(MarketKeyword marketKeyword);

    /**
     * 更新关键词
     *
     * @param marketKeyword 市场关键字
     * @author: jinmo
     * @date: 2022/06/26 20:09:24
     */
    void updateKeyword(MarketKeyword marketKeyword);

    /**
     * 修改关键词删除属性为1
     *
     * @param marketKeyword 市场关键字
     * @author: jinmo
     * @date: 2022/06/26 20:20:37
     */
    void updateKeywordDeleted(MarketKeyword marketKeyword);
}